from datetime import datetime
from django.contrib.auth.models import User
from django.db import models


class Wheel(models.Model):
    name = models.CharField(max_length=20, null=True)
    n_casting = models.IntegerField(default=0)
    n_machining = models.IntegerField(default=0)
    n_coating = models.IntegerField(default=0)
    n_sum = models.IntegerField(default=0)

    user = models.ForeignKey(User, on_delete=None)
    put_at = models.DateTimeField(default=datetime.now())  # 投料时间
    created = models.DateTimeField(default=datetime.now())
